package com.fxwater.biz.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.fxwater.biz.domain.FxwAlarmRecordInfo;
import com.fxwater.biz.domain.FxwAlermConfigInfo;
import com.fxwater.biz.mapper.AlermMapper;
import com.fxwater.biz.service.IAlermService;
import com.fxwater.common.annotation.DataScope;
import com.fxwater.common.core.text.Convert;

@Service
public class AlermServiceImpl implements IAlermService {
	
	@Autowired
	private AlermMapper alermMapper;

	@Override
	public List<FxwAlermConfigInfo> selectAlermConfigInfoList(FxwAlermConfigInfo alermConfigInfo) {
		// TODO Auto-generated method stub
		return alermMapper.selectAlermConfigInfoList(alermConfigInfo);
	}

	@Override
	public int addAlermConfigInfo(FxwAlermConfigInfo alermConfigInfo) {
		return alermMapper.addAlermConfigInfo(alermConfigInfo);
	}

	@Override
	public int removeAlermConfigInfo(String ids) {
		return alermMapper.removeAlermConfigInfo(Convert.toStrArray(ids));
	}

	@Override
	public int editAlermConfigInfo(FxwAlermConfigInfo alermConfigInfo) {
//		alermConfigInfo.setUpdateBy(ShiroUtils.getLoginName());
		return alermMapper.editAlermConfigInfo(alermConfigInfo);
	}

	@Override
	@DataScope(tableAlias="A")
	public List<FxwAlarmRecordInfo> selectAlarmRecordInfo(FxwAlarmRecordInfo alarmRecordInfo) {
		return alermMapper.selectAlarmRecordInfo(alarmRecordInfo);
	}

}
